import request from '@/utils/request'

export const listAppointment = (search) =>
    request({
        url: '/tOrderInfo',
        method: 'get',
        params: {
            name: search.name,
            orderStatus: search.orderStatus,
            offset: search.offset,
            limit: search.limit
        }
    })

export const updateAppointment = (appointment) =>
    request({
        url: '/tOrderInfo',
        method: 'put',
        data: appointment
    })

export const saveAppointment = (tOrderInfo, comboIds) =>
    request({
        url: '/tOrderInfo/' + comboIds,
        method: 'post',
        data: tOrderInfo
    })

export const listMember = () =>
    request({
        url: "/tMember",
        method: "post"
    })

export const changeStatus = (orderId,orderStatus) =>
    request({
        url:"/tOrderInfo/"+orderId+"/"+orderStatus,
        method:"put"
    })